<?php
	require_once("../../../include/connect.php");

	$tinh = $_POST['tinh'];
	$data = array();
	$query = mysql_query(" SELECT id,name FROM districts WHERE province_id = '$tinh' ");
	if(mysql_num_rows($query) > 0)
	{
		while($row = mysql_fetch_array($query))
		{
			//echo " <option value='".$row['id']."'> ".$row['name']." </option> ";
			$data[] = $row;
		}
		echo json_encode($data);
	}
	else
		echo "Chưa có huyện";
?>